﻿--HEADER Drop Old Tables

IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[StrategyGroupToSecurityOld]') AND type in (N'U'))
BEGIN
DROP TABLE dbo.StrategyGroupToSecurityOld
END

IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[StrategyGroupToTradeOld]') AND type in (N'U'))
BEGIN
DROP TABLE dbo.StrategyGroupToTradeOld
END

IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[StrategyGroupOld]') AND type in (N'U'))
BEGIN
DROP TABLE dbo.StrategyGroupOld
END

IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[userOld]') AND type in (N'U'))
BEGIN
DROP TABLE dbo.userOld
END

IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[iPerform].[IdeaOld]') AND type in (N'U'))
BEGIN
DROP TABLE iPerform.IdeaOld
END


IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[iPerform].[IdeaToSecurityOld]') AND type in (N'U'))
BEGIN
DROP TABLE iPerform.IdeaToSecurityOld
END


IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[iPerform].[IdeaToTemplateAnswerOld]') AND type in (N'U'))
BEGIN
DROP TABLE iPerform.IdeaToTemplateAnswerOld
END


IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[iPerform].[IdeaToTradeOld]') AND type in (N'U'))
BEGIN
DROP TABLE iPerform.IdeaToTradeOld
END